'use strict';

/**
 * @ngdoc overview
 * @name magisterkaGuiApp
 * @description
 * # magisterkaGuiApp
 *
 * Main module of the application.
 */

var BASE_WEBSERVICE_URL = "http://localhost:8080/magisterka-service/rest";

angular
    .module('magisterkaGuiApp', [
        'ngAnimate',
        'ngCookies',
        'ngResource',
        'ngRoute',
        'ngSanitize',
        'ngTouch',
        'ui.router',
        'facebook'
    ])
    .config(function ($stateProvider, $urlRouterProvider,FacebookProvider) {

        FacebookProvider.init('902389696451149');

        $urlRouterProvider.otherwise(function ($injector, $location) {
            $location.path('/');
        });

        $stateProvider.state('main', {
            url: "/",
            templateUrl: 'views/main.html',
            controller: 'MainCtrl'
        }).state('create_event', {
            url: "/create_event",
            templateUrl: 'views/create_event.html',
            controller: 'CreateEventCtrl'
        }).state('watch_event', {
            url: "/watch_event/:token",
            templateUrl: 'views/watch_event.html',
            controller: 'WatchEventCtrl'
        }).state('login', {
            url: "/login",
            templateUrl: 'views/login.html',
            controller: 'LoginCtrl'
        }).state('admin_panel', {
            url: "/admin_panel",
            templateUrl: 'views/admin_panel.html',
            controller: 'AdminPanelCtrl'
        });

    });

